<?php
class Bliss_Steam_User extends Bliss_Steam
{
	protected $_data;

	public function __construct($id)
	{
		parent::__construct();
		
		$this->setCommand('ISteamUser/GetPlayerSummaries/v0001', array(
			'steamids'	=> $id
		));
		$result	= json_decode($this->execute());

		$this->parseResult($result);
	}

	protected function parseResult($result)
	{
		$this->_data	= $result->response->players->player[0];
	}

	public function __isset($key) {
		return isset($this->_data->{$key});
	}
	
	public function __get($key)
	{
		return isset($this->_data->{$key}) ? $this->_data->{$key} : null;
	}
}